<script setup lang='ts'>

const props= defineProps<{
    modelValue:number
}>()
// 子向父传值
const emit =defineEmits<{
    // (e:'update:money',value:number):void
    (e:'update:modelValue',value:number):void
}>()
const add=()=>{
    // emit('update:money',props.money+10)
    emit('update:modelValue',props.modelValue+10)

}
</script>

<template>
<h1>子组件组件  --- {{props.modelValue}} ---</h1>
<button @click="add">加钱</button>
</template>

<style scoped>
</style>
